from multiprocessing import Value, Pool, Manager


def f(args):
    n, = args
    n.value = 1


if __name__ == '__main__':
    n = Value('d', 0.0)
    # n = Manager().Value('d', 0.0) # can workaround the error
    with Pool(1) as pool:
        pool.map(f, [(n,)])
    # RuntimeError: Synchronized objects should only be shared between processes through inheritance
    print(n.value)
